<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="30%">问答分类名称</th>
            <th class="text-center" width="20%">创建时间</th>
            <th class="text-center" width="10%">讲师数量</th>
            <th class="text-center" width="10%">问题数量</th>
            <th class="text-center" width="10%">状态</th>
            <th class="text-center" width="25%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th class="text-center" width="30%">&nbsp;</th>
                <th class="text-center" width="20%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="25%">&nbsp;</th>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="7" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="qaType : ${dataMap['list']}" th:attr="data-id=${qaType['id']}">
                <td class="text-center">
                    <div class="table-first-id">
                        <input type="checkbox" th:value="${qaType['id']}" th:text="${qaType['id']}" class="i-checks" name="qaTypeId"/>
                    </div>
                </td>
                <td class="text-center" th:text="${qaType['typeName']}"></td>
                <td class="text-center" th:text="${#strings.substring(qaType['createTime'],0,16)}"></td>
                <td class="text-center" th:text="${qaType['teacherNum']}"></td>
                <td class="text-center" th:text="${qaType['questionNum']}"></td>
                <td class="text-center" qaTypeStatus>
                    <span th:if="${qaType['status']}==1" class="label label-info">正常</span>
                    <span th:if="${qaType['status']}==2" class="label label-danger">禁用</span>
                </td>
                <td class="text-center" data-icon>
                    <a href="javascript:void(0);" class="c-master fs14" th:attr="data-id=${qaType['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看">
                        <i class="fa fa-eye"></i>
                    </a>
                    <a th:href="@{/admin/qa/qatype/initUpdate?qaTypeId={id}(id=${qaType['id']})}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="修改">
                        <i class="fa fa-edit"></i>
                    </a>
                    <a th:if="${qaType['status']} == 1" qaTypeStatus href="javascript:void(0);" class="c-master fs14 ml5" th:attr="data-id=${qaType['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="禁用">
                        <i class="fa fa-unlock-alt"></i>
                    </a>
                    <a th:if="${qaType['status']}==2" qaTypeStatus href="javascript:void(0);" class="c-master fs14 ml5" th:attr="data-id=${qaType['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复">
                        <i class="fa fa-history"></i>
                    </a>
                    <a th:attr="data-id=${qaType['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                        <i class="fa fa-trash-o"></i>
                    </a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>